Skip to content

issue/1117: metax support flash-attn#1119

Open
Ceng23333 wants to merge 5 commits intomainfrom
metax_fla
Open

issue/1117: metax support flash-attn#1119
Ceng23333 wants to merge 5 commits intomainfrom
metax_fla

Conversation

@Ceng23333
Copy link
Copy Markdown
Collaborator

Signed-off-by: Ceng23333 <441651826@qq.com>
Signed-off-by: Ceng23333 <441651826@qq.com>
@Ceng23333 Ceng23333 requested a review from a team April 3, 2026 04:34
Signed-off-by: Ceng23333 <441651826@qq.com>
Signed-off-by: Ceng23333 <441651826@qq.com>
Comment thread xmake.lua Outdated
if get_config("flash-attn") and get_config("flash-attn") ~= "" and has_config("metax-gpu") then
local flash_so_metax = _metax_flash_attn_cuda_so_path()
local flash_dir_metax = path.directory(flash_so_metax)
local flash_name_metax = path.filename(flash_so_metax)
Copy link
Copy Markdown
Collaborator

@qinyiqun qinyiqun Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这一块把c610的逻辑给覆盖了

#include <c10/cuda/CUDAGuard.h>
#endif

#ifdef ENABLE_NVIDIA_API
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ENABLE_QY_API也要加上

Signed-off-by: Ceng23333 <441651826@qq.com>

void run(void *planned_meta) {
#ifdef ENABLE_FLASH_ATTN
#ifdef ENABLE_NVIDIA_API
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这块的两个if的内容是一样的吧

#include <stdexcept>

#ifdef ENABLE_FLASH_ATTN
#if defined(ENABLE_NVIDIA_API) || defined(ENABLE_METAX_API)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

也需要加qy?或者不需要加这个if

@wooway777 wooway777 requested a review from qinyiqun April 16, 2026 01:25
*/
void run_flashattn_varlen_metax(PlannedMeta *p) {
c10::cuda::CUDAStreamGuard guard(infinicore::adaptor::get_cuda_stream());
auto t = prepare_varlen_flash_tensors(p);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是不是nv本来不用算这个,然后新佳乐一段?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants